/*
 * Copyright (c) 2021. Moses All Right Reserved
 */

package com.moses.design_patterns.decorator;

/**
 * @author Moses
 * @email shenhuohui@gmail.com
 * @date 2021/4/17 9:02
 */
// 定义装饰抽象类，方便拓展
public abstract class Decorator implements Component {
    private Component component;

    // 需要关联被装饰的对象
    public Decorator(Component component){
        this.component = component;
    }

    @Override
    public void component() {
        this.component.component();
    }
}
